﻿// --------------------------------
// <copyright file="PowerUpConfig.cs" company="Faculty of Information Technology, Czech Technical University in Prague">
//     This document is shared by Microsoft Public License (MS-PL)
//     For further details please see http://msdn.microsoft.com/en-us/library/ff648068.aspx or license.txt.
// </copyright>
// <author>Lukáš Molnár</author>

// <email>molnaluk@fit.cvut.cz</email>

// <date>7. 12. 2011 18:54:00</date>

// <summary>
//
// </summary>
// --------------------------------

using System;
using FITClub.Util;
using Microsoft.Xna.Framework;

namespace FITClub.Episode1.Levels
{
    /// <summary>
    /// Configures Power-up component
    /// </summary>
#if WINDOWS

    [Serializable]
#endif
    public class PowerUpConfig : AVisibleComponentConfig
    {
        public double MinTimeBeforeShow { get; set; }

        public double MaxTimeBeforeShow { get; set; }

        public double ShowTime { get; set; }

        public int MaxPowerUpsOnScreen { get; set; }

        public static PowerUpConfig Default(Vector3 position)
        {
            return Default(position, "powerUps\\powerUp");
        }

        public static PowerUpConfig Default(Vector3 position, string modelPath)
        {
            return new PowerUpConfig()
            {
                ModelPath = modelPath,
                MaxPowerUpsOnScreen = 2,
                MinTimeBeforeShow = 5.0,
                MaxTimeBeforeShow = 15.0,
                ShowTime = 10.0,
                Transforms = new MatrixTransforms()
                {
                    Scale = new Vector3(0.3f, 0.3f, 0.3f),
                    Translation = position,
                    Rotation = Vector3.Zero
                }
            };
        }

#if WINDOWS

        public override object Clone()
        {
            return ObjectCopier.Clone<PowerUpConfig>(this);
        }

#endif
    }
}